import { commonRequest } from '@/api/commonHttp';

// SPU信息查询（关联商品弹框表格数据查询）
export const getSpuPagerService = (data, loadingFn) => commonRequest({
  url: '/sysback/update/product/spuBasicInfo/getSpuPager',
  type: 'post',
  data,
  loadingFn
});

// SPU基本信息查询（关联商品带出数据结果）
export const getSpuBasicInfoListService = (data, loadingFn) => commonRequest({
  url: '/sysback/update/product/spuBasicInfo/getSpuBasicInfoList',
  type: 'post',
  data,
  loadingFn
});

// SPU基本信息 - 导出
export const exportSpuDataService = (data, loadingFn) => commonRequest({
  url: '/sysback/update/product/spuBasicInfo/exportExcel',
  type: 'post',
  data,
  loadingFn,
  isExport: true
});

// SPU基本信息 - 提交
export const commitSpuDataService = (data, loadingFn) => commonRequest({
  url: '/sysback/update/product/spuBasicInfo/commit',
  type: 'post',
  data,
  loadingFn
});

// SPU基本信息 - 添加自定义属性
export const addCustomAttrService = (data, loadingFn) => commonRequest({
  url: '/sysback/update/product/spuBasicInfo/addCustomAttr',
  type: 'post',
  data,
  loadingFn
});

// SPU基本信息 - 查看单据信息查询
export const getRecordInfoForViewService = (data, target) => commonRequest({
  url: '/sysback/update/product/spuBasicInfo/getRecordInfo',
  type: 'get',
  data,
  target
});

// SPU基本信息 - 修改单据信息查询
export const getRecordInfoForEditService = (data, target) => commonRequest({
  url: '/sysback/update/product/spuBasicInfo/getRecordInfoForEdit',
  type: 'get',
  data,
  target
})
